using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._ConversionTools._ToGeodatabase
{
    /// <summary>
    /// <para>CAD To Geodatabase</para>
    /// <para>Reads a CAD dataset and creates feature classes of the drawing. The feature classes are written to a geodatabase feature dataset.</para>
    /// <para>读取 CAD 数据集并创建图形的要素类。要素类将写入地理数据库要素数据集。</para>
    /// </summary>    
    [DisplayName("CAD To Geodatabase")]
    public class CADToGeodatabase : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public CADToGeodatabase()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_input_cad_datasets">
        /// <para>Input CAD Datasets</para>
        /// <para>The collection of CAD files to convert to geodatabase features.</para>
        /// <para>要转换为地理数据库要素的 CAD 文件的集合。</para>
        /// </param>
        /// <param name="_out_gdb_path">
        /// <para>Output Geodatabase</para>
        /// <para>The geodatabase where the output feature dataset will be created. This geodatabase must already exist.</para>
        /// <para>将在其中创建输出要素数据集的地理数据库。此地理数据库必须已存在。</para>
        /// </param>
        /// <param name="_out_dataset_name">
        /// <para>Dataset</para>
        /// <para>The name of the feature dataset to be created.</para>
        /// <para>要创建的要素数据集的名称。</para>
        /// </param>
        /// <param name="_reference_scale">
        /// <para>Reference scale</para>
        /// <para>This parameter is not needed for this tool as CAD annotation is treated as points in ArcGIS Pro.</para>
        /// <para>此工具不需要此参数，因为 CAD 注记在 ArcGIS Pro 中被视为点。</para>
        /// </param>
        public CADToGeodatabase(List<object> _input_cad_datasets, object _out_gdb_path, object _out_dataset_name, double? _reference_scale)
        {
            this._input_cad_datasets = _input_cad_datasets;
            this._out_gdb_path = _out_gdb_path;
            this._out_dataset_name = _out_dataset_name;
            this._reference_scale = _reference_scale;
        }
        public override string ToolboxName => "Conversion Tools";

        public override string ToolName => "CAD To Geodatabase";

        public override string CallName => "conversion.CADToGeodatabase";

        public override List<string> AcceptEnvironments => ["MResolution", "MTolerance", "XYDomain", "XYResolution", "XYTolerance", "ZResolution", "ZTolerance", "extent", "geographicTransformations", "outputCoordinateSystem", "outputMFlag", "outputZFlag", "outputZValue", "scratchWorkspace", "workspace"];

        public override object[] ParameterInfo => [_input_cad_datasets, _out_gdb_path, _out_dataset_name, _reference_scale, _spatial_reference, _out_dataset];

        /// <summary>
        /// <para>Input CAD Datasets</para>
        /// <para>The collection of CAD files to convert to geodatabase features.</para>
        /// <para>要转换为地理数据库要素的 CAD 文件的集合。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input CAD Datasets")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public List<object> _input_cad_datasets { get; set; }


        /// <summary>
        /// <para>Output Geodatabase</para>
        /// <para>The geodatabase where the output feature dataset will be created. This geodatabase must already exist.</para>
        /// <para>将在其中创建输出要素数据集的地理数据库。此地理数据库必须已存在。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Geodatabase")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _out_gdb_path { get; set; }


        /// <summary>
        /// <para>Dataset</para>
        /// <para>The name of the feature dataset to be created.</para>
        /// <para>要创建的要素数据集的名称。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Dataset")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _out_dataset_name { get; set; }


        /// <summary>
        /// <para>Reference scale</para>
        /// <para>This parameter is not needed for this tool as CAD annotation is treated as points in ArcGIS Pro.</para>
        /// <para>此工具不需要此参数，因为 CAD 注记在 ArcGIS Pro 中被视为点。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Reference scale")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public double? _reference_scale { get; set; }


        /// <summary>
        /// <para>Spatial Reference</para>
        /// <para>The spatial reference of the output feature dataset. If you wish to control other aspects of the spatial reference, such as the xy, z, m domains, resolutions, and tolerances, set the appropriate geoprocessing environments.</para>
        /// <para>输出要素数据集的空间参考。如果要控制空间参考的其他方面，例如 xy、z、m 属性域、分辨率和容差，请设置适当的地理处理环境。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Spatial Reference")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _spatial_reference { get; set; } = null;


        /// <summary>
        /// <para>Output Feature Dataset</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Feature Dataset")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _out_dataset { get; set; }


        public CADToGeodatabase SetEnv(object MResolution = null, object MTolerance = null, object XYDomain = null, object XYResolution = null, object XYTolerance = null, object ZResolution = null, object ZTolerance = null, object extent = null, object geographicTransformations = null, object outputCoordinateSystem = null, object outputMFlag = null, object outputZFlag = null, object outputZValue = null, object scratchWorkspace = null, object workspace = null)
        {
            base.SetEnv(MResolution: MResolution, MTolerance: MTolerance, XYDomain: XYDomain, XYResolution: XYResolution, XYTolerance: XYTolerance, ZResolution: ZResolution, ZTolerance: ZTolerance, extent: extent, geographicTransformations: geographicTransformations, outputCoordinateSystem: outputCoordinateSystem, outputMFlag: outputMFlag, outputZFlag: outputZFlag, outputZValue: outputZValue, scratchWorkspace: scratchWorkspace, workspace: workspace);
            return this;
        }

    }

}